package cn.task.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.task.po.Task;
import cn.task.po.Taskapplication;
import cn.task.po.TaskapplicationVo;
import cn.task.service.TaskService;
import cn.task.service.TaskapplicationService;
@Controller
public class TaskapplicatController {
	@Autowired
	private TaskapplicationService taskapplicationService;
	@Autowired
	private TaskService taskService;
	@RequestMapping(value="/getTaskAppInform")
	public List<Task> getTaskAppInform(HttpServletRequest request)
	{
		String taskId=request.getParameter("taskId");
		List<Taskapplication> list=taskapplicationService.selectTaskapplicat(taskId);
		for(Taskapplication taskapp:list)
		{
			String id=taskapp.getTaskid();
			taskService.selectTaskById(id);
		}
		return null;
	}
	@RequestMapping(value="/shareTask.action")
	public @ResponseBody List<Taskapplication> shareTask(HttpServletRequest request)
	{
		String taskId=request.getParameter("taskId");
		return taskapplicationService.selectTaskapplicat(taskId);
	}
}
